<%-- 
    Document   : delete
    Created on : Jul 5, 2011, 8:13:55 PM
    Author     : Admin
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="javax.naming.*" %>
<%@page import="ejb.user.*" %>
<%@page import="ejb.object.*" %>
<%@page import="client.common.*" %>
<%@page import="java.util.ArrayList"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>

        <%
             try {

                Config.settingSystemPropertiesForSessionBean();
                Context ctx=new InitialContext();
                Object ref=ctx.lookup("User");
                UserRemoteHome home=(UserRemoteHome)ref;


                try{
                    UserRemote remote=home.create();
                  remote.delete(Integer.parseInt(request.getParameter("id")));
                  

                }
                catch(Exception ex){
                    ex.printStackTrace();
                }
          }
          catch(ConfigException configException){
            configException.printStackTrace();
          }

        catch(Exception ex){


        }
            response.sendRedirect("main.jsp");
        %>
    </body>
</html>
